﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework.Db;
using Framework.Kit;

namespace BLL.Service
{
    /// <summary>
    /// 用户服务
    /// </summary>
    public class userService : DbBase
    {
        // 用户登录操作
        public bool UserLogin(string loginName, string loginPwd, string seatNum)
        {
            try
            {
                StringBuilder sql = new StringBuilder();
                sql.Append("SELECT count(*) from AUCTION_USER a ,BIDUSER b where a.BIDUSER_NO IN (select BIDUSER_NO from BIDUSER where LOGIN_NAME='");
                sql.Append(loginName).Append("') AND a.AUCTION_USERPASSWORD='").Append(loginPwd).Append("' AND a.SEATNUMBER='").Append(seatNum).Append("'");
                int rel = Convert.ToInt32(queryOneSQL(sql.ToString()));
                return rel > 0 ? true : false;
            }
            catch (Exception ex)
            {
                other.WriteErrLog("用户登录操作", ex);
                return false;
            }
        }
    }
}
